using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using OneSoft.EntityCore;
using OneSoft.DataAccess;
using BySoft.Server.Common.Entity;
using BySoft.Server.Common.Schema;

namespace BySoft.Server.DataAccess
{
public partial class BsOutorderdetailDA
{
#region GetByID
/// <summary>
/// 取得实体
/// </summary>
/// <param name="id">实体关键字</param>
/// <returns></returns>
public static BsOutorderdetailEntity GetBsOutorderdetailByID(Decimal? id)
{
string strSQL = "SELECT * FROM " + BsOutorderdetailTable.C_TABLENAME;
WhereBuilder wb = new WhereBuilder(strSQL);
wb.AddAndCondition(BsOutorderdetailTable.C_DETAILID, SQLOperator.Equal, id);
return OneSoft.DataAccess.DataAccessCommon.SelectSingle<BsOutorderdetailEntity>(wb);
}

#endregion

#region GetAll
/// <summary>
/// 获取所有数据
/// </summary>
/// <returns>所有数据集合</returns>
public static DataSet GetBsOutorderdetailAll()
{
string strSQL = "SELECT * FROM " + BsOutorderdetailTable.C_TABLENAME;
return OneSoft.DataAccess.DataAccessCommon.SelectDataSet(strSQL);
}
#endregion

#region GetByCondition

/// <summary>
/// 根据Condition获取DS
/// </summary>
/// <returns>所有数据集合</returns>
public static DataSet GetDSByCondition(string strCondition)
{
string strSQL = "SELECT * FROM " + BsOutorderdetailTable.C_TABLENAME;
WhereBuilder wb = new WhereBuilder(strSQL);
wb.AddCondition(strCondition);

return OneSoft.DataAccess.DataAccessCommon.SelectDataSet(wb);
}

/// <summary>
/// 根据Condition获取实体集合
/// </summary>
/// <param name="strCondition">SQL条件</param>
/// <returns>实体集合</returns>
public static List<BsOutorderdetailEntity> GetByCondition(string strCondition)
{
string strSQL = "SELECT * FROM " + BsOutorderdetailTable.C_TABLENAME;
WhereBuilder wb = new WhereBuilder(strSQL);
wb.AddCondition(strCondition);

return OneSoft.DataAccess.DataAccessCommon.Select<BsOutorderdetailEntity>(wb);
}
#endregion
}
}